#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include <QMouseEventTransition>
#include <QMouseEvent>
#include <QPropertyAnimation>
//#include <QRect>

namespace Ui {
class btForm;
}

class btForm : public QWidget
{
    Q_OBJECT

public:
    explicit btForm(QWidget *parent = nullptr);
    ~btForm();
//设置左侧按钮的图片与名字
    void setIcon(const QString btIcon,const QString content,int pageId);
    void mousePressEvent(QMouseEvent *event);
    int getPageId(){return pageId;}
    void clearBg();
    void showAnimation();
    void changeColor();
signals:
    void clicked(int id);//处理左侧窗口中按钮被点击，如果被点击就让按钮变绿

private:
    Ui::btForm *ui;
    int pageId;//页面id
    QPropertyAnimation* animationLine1;//设置动画效果
    QPropertyAnimation* animationLine2;
    QPropertyAnimation* animationLine3;
    QPropertyAnimation* animationLine4;
};

#endif // BTFORM_H
